package butines.game.lastcolony.entities;

public class EntityOrders {

    public static enum Type {
        STAND, MOVE, GUARD, FLOAT, DEPLOY, ATTACK
    }

    private Type type = Type.STAND;
    private Entity to;
    private Float toX;
    private Float toY;

    public EntityOrders() {

    }

    public EntityOrders(Type type) {
        this.type = type;
    }

    public Type getType() {
        return type;
    }

    public void setType(Type type) {
        this.type = type;
    }

    public Entity getTo() {
        return to;
    }

    public void setTo(Entity to) {
        this.to = to;
    }

    public Float getToX() {
        return toX;
    }

    public void setToX(Float toX) {
        this.toX = toX;
    }

    public Float getToY() {
        return toY;
    }

    public void setToY(Float toY) {
        this.toY = toY;
    }
    
    public float getX() {
        return toX != null ? toX : (to != null ? to.getX() : -1);
    }
    
    public float getY() {
        return toY != null ? toY : (to != null ? to.getY() : -1);
    }

}
